package com.woniu.presell.service.impl;

import com.woniu.presell.entity.Floor;
import com.woniu.presell.mapper.FloorMapper;
import com.woniu.presell.service.FloorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: house-after
 * @description:
 * @author: qqq
 * @create: 2022-12-06 15:49
 **/
@Service
public class FloorServiceImpl implements FloorService {
    @Autowired
    private FloorMapper floorMapper;
    @Override
    public List<Floor> selectAll(Long id) {
        return floorMapper.selectAll(id);
    }

    @Override
    public Floor selectByFloorId(Long id) {
        return floorMapper.selectByPrimaryKey(id);
    }

    @Override
    public List insertSelective(Integer id) {
//        List<Floor> list=new ArrayList<>();
//        for (int i=1;i<8;i++){
//            Floor floor=new Floor();
//            floor.setFloorNo("000"+i);
//            floor.setFloorName(i+"号楼");
//            floor.setFloorAllno(7+"");
//            floor.setFloorRoomno(42+"");
//            floor.setFloorArea(3000+"");
//            floor.setHigherId(id);
//            floor.setBak1("普通公寓");
//            list.add(floor);
//        }
//        floorMapper.myinsert(list);
        return null;
    }
}
